//---------------------------------------------------------------------------

#include <clx.h>
#pragma hdrstop

#include "uProjectOptions.h"
#include "Support.h"
#include "packages.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.xfm"
TProjectOptions *ProjectOptions;
//---------------------------------------------------------------------------
__fastcall TProjectOptions::TProjectOptions(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::AddDesignPackageClick(TObject *Sender)
{
    TPackage * package;
    int Pos;

    OpenPackage->DefaultExt = "*.so";
    OpenPackage->Title = _("Open");
    OpenPackage->Execute ();

    if (OpenPackage->FileName.Length ())
    {
        package = new TPackage;
        if (package->Load (AnsiString (OpenPackage->FileName)))
        {
            PackageList->Add(package);
            Pos = DesignPackageList->Items->Add(package->Description);
            DesignPackageList->Checked [Pos] = true;
            Application->MessageBox(_("Package registered sucefully!"));
        }
        else
        {
            delete package;
            Application->MessageBox(_("Invalid package to load!"));
        }
    }
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::RemoveDesignPackageClick(TObject *Sender)
{
//        
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::EditDesignPackageClick(TObject *Sender)
{
//        
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::ComponentsOfPackageClick(TObject *Sender)
{
//        
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::BuildRuntimePackagesClick(TObject *Sender)
{
//        
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::RuntimePackagesChange(TObject *Sender)
{
//        
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::AddRuntimePackageClick(TObject *Sender)
{
//        
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::OkClick(TObject *Sender)
{
    //
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::CancelClick(TObject *Sender)
{
    Close ();
}
//---------------------------------------------------------------------------

void __fastcall TProjectOptions::DesignPackageListClickCheck(
      TObject *Sender)
{
//
}
//---------------------------------------------------------------------------

